package extends1demo;

public class Test2 {
    public static void main(String[] args) {
    Zi z=new Zi();
    z.show();
    }
}

class  Fu{
    String name="父类的name";
    public void run(){
        System.out.println("父类的run");
    }
}
class Zi extends Fu{
    String name="子类的name";
    public void show(){
        String name = "show的name";
        System.out.println(name);//show的name
        System.out.println(this.name);//子类的name
        System.out.println(super.name);//父类的name
        run();//子类
        super.run();//父类的
    }

    public void run(){
        System.out.println("子类的run");
    }
}
